<template>
  <div style="padding: 10px">
    <el-tabs v-model="activeName">
      <el-tab-pane label="考试监控" name="first">
        <examHome @monitorRoll="monitorRoll" v-if="activeName === 'first'"></examHome>
      </el-tab-pane>
      <el-tab-pane disabled label="监考名单" name="second">
        <monitorRoll :ids="ids" v-if="activeName === 'second'"/>
      </el-tab-pane>
    </el-tabs>

  </div>
</template>

<script>
import examHome from './components/examHome';
import monitorRoll from './components/monitorRoll';

let _this = null;
export default {
  components: {examHome, monitorRoll},
  data() {
    return {
      ids: null,
      activeName: 'first',

    }
  },
  methods: {
    monitorRoll: function (data) {
      this.ids = data.data;
      this.activeName = "second"
    }
  },
  created() {
    _this = this;
  }
}
</script>

<style scoped lang="scss">

</style>
